//
//  TZCoverView.m
//  BSBDJ
//
//  Created by user on 16/5/23.
//  Copyright © 2016年 Burning. All rights reserved.
//

#import "TZCoverView.h"

@interface TZCoverView()

@end


@implementation TZCoverView
- (IBAction)clickCanleBtn:(id)sender {

    if (_cancleBlock) _cancleBlock();
    
}
- (IBAction)clickTrueBtn:(id)sender {

    if (_DefaultBlock) _DefaultBlock();
}
+ (instancetype)showCoverView
{
    TZCoverView *coverView = [TZCoverView new];
    coverView.backgroundColor = [UIColor blackColor];
    coverView.frame = [UIApplication sharedApplication].keyWindow.bounds;
    coverView.alpha = 0.5;
    [[UIApplication sharedApplication].keyWindow addSubview:coverView];
    return coverView;
}


+  (instancetype)coverView
{
    return [[NSBundle mainBundle]loadNibNamed:@"TZCoverView" owner:nil options:nil].lastObject;
}

+ (void)removeCoverView
{
    
    for (UIView *childView in [UIApplication sharedApplication].keyWindow.subviews) {
        [childView removeFromSuperview];
    }
}

@end
